<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title>Test</title>
    <script>
      (function() {
        var currentHostname = window.location.hostname;
  
          // 判断主机名是否是内网地址
          if (currentHostname.startsWith('192.168.') || currentHostname.startsWith('10.') || currentHostname === 'localhost')
          window.config = {
            dsApiRoot: 'http://127.0.0.1:8088/base',
            IAM_ApiRoot: 'http://127.0.0.1:8888/iam',
            loginUrl: 'http://127.0.0.1:8088/base/user/login', // 登录页面地址
            thisPageUrl: 'http://localhost:8080' // 当前 页面、前端的地址
          };
        else
          window.config = {
            dsApiRoot: 'https://base.ajaxjs.com/cjg',
            IAM_ApiRoot: 'http://127.0.0.1:8888/iam',
            loginUrl: 'https://base.ajaxjs.com/cjg/user/login',
            thisPageUrl: 'https://dev.ajaxjs.com/demo/data-service'
          };
        })();
    </script>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
